package src.graph;

import java.util.Map;
import java.util.Set;

import src.util.MiniSet;

import checkers.javari.quals.Mutable;
import checkers.javari.quals.ReadOnly;
import checkers.nullness.quals.NonNull;
import checkers.nullness.quals.Nullable;
import checkers.quals.DefaultLocation;
import checkers.quals.DefaultQualifier;

public class Main {

	public static void main(String[] args) {
		GraphFactory factory = new GraphFactory();

		Graph g = factory.build();
		g.addNode("1");
		g.addNode("2");
		g.addNode("3");
		g.addEdge("1", "2");
		g.addEdge("2", "3");
		g.addEdge("1", "3");
		g.addEdge("3", "1");

		GraphPrinter printer = new GraphPrinter();
		String out = printer.print(g);

		System.out.println("Graph g:");
		System.out.println(out);

		GraphCopier copier = new GraphCopier();
		Graph f = copier.copy(g);

		if (g.equals(f))
			System.out.println("g equals to f");
		else
			System.out.println("g is not equals to f");

		if (g.isLatest(new String("3").intern()))
			System.out.println("3 is latest");
		else
			System.out.println("3 is not latest");

		MiniSet<String> x = g.succesors("2");
		x.toString();

		if (f.containsEdge("1", "3"))
			System.out.println("f contains 1 -> 3");
		else
			System.out.println("f does not contain 1 -> 3");
		
		if (f.containsEdge("2", "1"))
			System.out.println("f contains 1 -> 3");
		else
			System.out.println("f does not contain 1 -> 3");
		
		endMain(g);

	}

	private static void endMain(Graph g) {

	}

}
